home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
MTC_V205.ARJ
/
MTCDOCEN.DOC
< prev
next >
Wrap
Text File
|
1991-07-21
|
47KB
|
1,005 lines
╔══════════════════════════════ ┌─────────────────┐
║ MTC Make Them Check │ D.I.S.P. │────┐
║ │ │░░░░│
╟────────────────────────────── │ │░░░░│
║ (c) 1991 Robert W.van Hoeven │ Dutch │░░░░│
╟────────────────────────────── │ Independent │░░░░│
║ Release : 2.05 │ ShareWare │░░░░│
║ Rel.Date: 21th July 1991 │ Programmer│░░░░│
╠══════════════════════════════ └─────────────────┘░░░░│
║ | │░░░░░░░░░░░░░░░░░│
║ │ MTC.EXE | └─────────────────┘
║ │ | ┌─────┐ |
║ │ | │░░░░░│ |
║ │ | └──┬──┘ |
║ │ Lines marked with '│' are | ┌────┴────┐ |
║ │ changes from version 2.01. ------││││││ ═══│-------
║ └─────────┘
╠═══════════════════════════════
║ Address: Robert W. van Hoeven
║ PO. Box 131
║ 1170 AC Badhoevedorp
║ Nederland / Holland
╚═══════════════════════════════
┌───────┬─────────────────────────────────────────────────────────────┐
│ 0 │ Table of contents │
└───────┴─────────────────────────────────────────────────────────────┘
1 ---- General information
1.1 Copyrights and License Agreement
1.2 Newer versions and contacting the author
2 ---- Package description and requirements
2.1 Introduction
│ 2.2 Installation
2.3 Instructions on usage
2.4 Runtime options
2.5 Switches
2.6 Options that do something with the date
2.6.1 Normal dates
2.6.2 Relative dates
2.6.3 Absolute dates
2.7 Options that do something with the RS232
2.8 Options that do something with DesqView
2.9 Options that do something with files
2.10 Options that do something with (space on) disks
2.11 Options that do something with the PC environment
3 ---- Package description and requirements
3.1 A simple example for backup
3.2 An example of tossing messages when received
3.3 An example of a cold/warm start of a terminal program
3.4 An example of a full optimize of a 120Mb HDU
4 ---- Version information and credits
4.1 The BETA-team
4.2 Credits
4.3 Version history
4.4 Copyright, Trademarks
┌───────┬─────────────────────────────────────────────────────────────┐
│ 1 │ General information │
└───────┴─────────────────────────────────────────────────────────────┘
1.1 Copyrights and License Agreement
────────────────────────────────────
- Users of the MTC-package must accept this disclaimer of warranty:
- The MTC-package is supplied as is. The author disclaims all
warranties, expressed or implied, including, without limitation,
the warranties of merchantability and of fitness for any purpose.
The author assumes no liability for damages, direct or consequential,
which may result from the use of the MTC-package;
- The MTC-package is a "shareware program" and is provided at no charge
to the user for evaluation. Feel free to share it with your friends,
but please do not give it away altered or as part of another system.
The essence of "user-supported" software is to provide personal
computer users with quality software without high prices, and yet to
provide incentive for programmers to continue to develop new products.
- If you find this program useful and find that you are using and
continue the use of the MTC-package after a 30 days trial period,
you must register the MTC-package as described in the supplied file
REGISTER.MTC;
- The registration of the MTC-package will license ONE copy for use on
any computer at any one time, as long as the usage confirms to the
type of registration you have done (so NON-commercial usage when you
have a non-commercial license);
- Anyone distributing the MTC-package for any kind of remuneration must
first contact the Author at the address above for authorization.
- You are encouraged to pass a copy of the MTC-package along to your
friends for evaluation. Please encourage them to register their
copy if they find that they can use it;
- Support on MTC, when used in a non-commercial environment, is
available by means of written letters or by entering the inter-
national echomail area DISP;
- Problems and suggestions can be entered in the FidoNet <tm> Echomail
conference <tm> called DISP (international). Entering this echo does
not exclude you of the duty to register the MTC-package, though users
who evaluate the product can enter the echo for questions;
- The MTC-package, all programs, the documentation and support-files is
copyrighted 1991 by Robert W. van Hoeven, PO. Box 131, Badhoevedorp
1170AC, Holland. All rights are reserved. You may copy this package
for backup purposes. Also you may copy and share unmodified copies of
the whole package, providing that the copyright notice is reproduced
and included on all copies.
Excluded from this statement are the support-files written by other
authors. Please refer to the documentation of these programs for
copyrights and license agreements;
- It is forbidden to modify, adapt, translate, reverse engineer, de-
compile and/or disassemble the software in the MTC-package. Patching
the medium at places that carry the software is seen as a program
change and is also forbidden;
- Performing any of the illegal actions as stated in the previous
lines, is a theft and no fair play to the author and, more important,
to the registered users;
- Bulletin Board Systems that distribute the MTC package can convert
the WHOLE package to any archive-system they like but all original
files must be included in the new archive. The MTC-package on the
Bulletin Board can contain at the most 2 extra files. These files
can only be a commercial for that Bulletin Board and/or validation
data that is presented as a service to all users and shall have no
other functions;
- After the normal trial period of 30 days, you must register the soft-
ware or you must remove it from your PC;
- Comments, suggestions and bug reports are welcome and will be answered
as soon I have the time to do so. You can send me a letter of leave a
NetMail <tm> message named to Rob Van.hoeven (mind the point) on node
2:512/100 (RA Support, Monster, Holland, SysOp is Reinier de Groot).
When you want to send me normal mail, address it to:
Robert W. van Hoeven, PO. Box 131, 1171 AC Badhoevedorp, Holland;
Also you can enter messages in the FidoNet <tm> DISP Echomail <tm>
area;
1.2 Newer versions and contacting the author
────────────────────────────────────────────────────────────────────────
The newest version of MTC is always available at the DISP-HQ on node
2:512/100. MTC is also distributed thru a number of DISP support nodes.
You can obtain MTC in four different ways:
- Logging on at DISP-HQ or a support node
All zones : 2:512/100 (Multiline Paradise NL #1) DISP-HQ
(Sysop: Reinier de Groot )
2:512/129 (MultiLine Paradise NL #2) DISP-HQ
(Sysop: Reinier de Groot )
For zone 1: 1:203/988 (Amber Shadow USA ) Support & beta
(Sysop: Dave Overton )
1:154/40 (The Anonymous BBS USA ) Support & beta
(Sysop: Bob R. )
For zone 2: 2:280/216 (Sirex NL ) Support & beta
(Sysop: Gerry Ulrich )
2:242/4 (GOLEM Meerbusch FRG ) Support & beta
(Sysop: Hanstheo Wolf )
2:241/5603 (FunBoard Felbert FRG ) Support & beta
(Sysop: Dirk Astrath )
2:244/8500 (Nilpferd BBS FRG ) Support & beta
(Sysop: Joerg Dassler )
2:403/139 (The Black Universe ISR ) Support & beta
(Sysop: Saar Blitz & )
( Addy Santos )
2:405/166 (Hith Hiker BBS ISR ) Support & beta
(Sysop: Alon Gingold )
2:200/407 (Secret Blue Valley SWE ) Support & beta
(Sysop: Andreas Birgerson)
2:257/168 (Barnabas the Caring UK ) Support & beta
(Sysop: John Barton )
2:440/63 (The Frontier BBS ) Support & beta
(Sysop: Dave Parker )
2:335/5 (DBridge/Raccess support ) Support & beta
(SysOp: Stephano Pasquini)
For zone 3: Pending
For zone 5: Pending
For zone 4 and 6 (vacant, it can be you ! )
The BBS's above will always have the most current version of MTC
available. Also, in some cases, it is possible to request the
newest MTC with a standard file-request (ask the SysOp in question).
On 2:512/100 you can use MTCNEW as magical name to Freq. the newest
version.
The actual DISP-HQ is point 2:512/100.5, but this is a closed system
and can not be accessed from the 'outside'). You CAN address netmail
to this point though !
- Logging on to your own BBS;
Chances are, that you will find an older version (international
users) because it will take some time for the new version to
'bleed' thru the net;
- Update service;
You can enter a special update service (read REGISTER.MTC).
If you think you have found problems in MTC, or in any other case,
you wish to contact the author, you can send me:
- A letter to the address you can find in the header of this file;
- A NetMail <tm> message to Rob Van.hoeven (please mind the point
between Van and Hoeven) at 2:512/100 or (better) 2:512/100.5;
- A Message in the FidoNet <tm> DISP echomail <tm> area;
┌───────┬─────────────────────────────────────────────────────────────┐
│ 2 │ Package description │
└───────┴─────────────────────────────────────────────────────────────┘
2.1 Introduction
────────────────────────────────────────────────────────────────────────
After CDT V 1.01 I got very angry. After calculating all the programs
I used for several checks in batch-files, I decided to write one big
program that can do it all. The version you currently have is the new
2.01 or one of the follow-up releases and contains a wide variety of
of tests you can submit in batch-files. I renamed the program from
CDT to MTC, because Make Them Check cover the functions of the program
somewhat better than Check Daily Task.
If a special batch-language (both resident or compiler) is not your
taste, MTC is something for you !!
When you use resident batch-compilers to do some or all of the tasks
that are present in MTC, you are consuming lots of memory as long as
the computer is on, for a, relative, short execution-time. The last
few months we can see many batch-file compilers with added features
in both the Shareware and commercial circuit. I own one of them
(The Builder, licensed), but for these simple tasks, I don't use them.
Either the batches change to many times or the tests are done in the
AUTOEXEC.BAT file. The last one is one of these batch files that can
not be compiled (I know, you can build a AUTOEXEC.BAT file with just
one call to a compiled batch, but that is not what I want).
MTC is a little program that can be included in your batch-file(s) like
AUTOEXEC.BAT and will check if a certain task is already done or is
(still) pending (today or from an earlier date). MTC can be used on
255 different tasks and will only consume 1 directory entry (no real
disk-clusters) for every task you would like to check unless you use
the @C option. In that case, MTC will create a 8-byte file (that WILL
consume at least one cluster on your disk).
One of the problems of most of these type of programs is, that they
can do only one type of test. They either patch themselves to 'reduce'
the amount of disk space needed or they can only handle one semaphore-
file (a file that is used by such a program to compare the current
and the previous status). The second type is already much in advan-
tage. I dislike self-patching programs. Most of the time you can not
compress them and sometimes they set the 'archive' bit after every
test, causing them to be included in any (consolidated) backup. MTC
also uses semaphore files (up to 255, depending on the number of
different tests (I call them 'tasks')). Except one type, the all use
nope/null/nill/no bytes of disk-space except the directory entry in
the directory that will contain the file.
The tests you can do are not only date-tests but also communications,
disk-space and file tests are included. The list of test will enhance
with newer versions (or already available in this version), like tests
on the CPU-type, tests if disks are present, tests on video cards and
so on....
One of the big advantages of MTC is, that you as the user, can store
requests of new tests that are to be included in a newer version. Use
your netmail/echomail possibilities to send them to me.
│2.2 Installation
│────────────────────────────────────────────────────────────────────────
│Copy MTC.EXE and MTCCFG.EXE to some directory in the DOS-path and start
│MTCCFG.EXE. Be sure to use the same versions of MTCCFG.EXE and MTC.EXE
│otherwise you get errors !!!!
│
│You can now install the defaults you like to use for the user-input and
│the sound. These options can still be overruled with some switches but
│in general, you can use MTC with the smallest number of parameters when
│you set the correct defaults you like.
│
│AFTER you have used MTCCFG.EXE, you can use programs like PKLITE, LZEXE
│and other compressors on your patched copy of MTC.EXE. If you want to
│change the defaults again (with MTCCFG.EXE) you must uncompress the
│program OR use a fresh copy of MTC.EXE again !
2.3 Instructions on usage
────────────────────────────────────────────────────────────────────────
MTC has the following syntax :
MTC [TASK:t] {DESC:dddd_dddd} [option] {switch} .. {switch}
Each of these parameters will be described below and also an example
of a batch-file is given.
The most important thing to know is how MTC does its work. I will
describe them in a few simple steps:
- When MTC comes active, it will test for the task-number. With help
of this task-number, you can do up to 255 independent tests in your
machine with only one copy of MTC. One independent test is called
a task;
- If the task-number is found, MTC will check what type of test is
needed. If this is established, MTC continues;
- MTC will try to find a task-file (semaphore file) with the name
MTC.nnn (where nnn is the task-number between 000 and 255) in the
DOS-path, the directory where MTC.EXE is stored or the current
directory;
- If not found, MTC will do the test (optionally ask the user if
the test is allowed) and create a new MTC.nnn file in the directory
where MTC.EXE is found (if this is not what you want, you must move
the MTC.nnn file afterwards to the place you like). If the test is
triggered (OK), MTC will return with an errorlevel (dependent on
the type of test);
- If found, MTC will compare the semaphore file to see if the test is
already done. If this is the case, MTC will return with errorlevel 0.
Otherwise, MTC will do the test (optionally ask the user if the test
is allowed) and update MTC.nnn to the new situation;
With the error-level that is returned by MTC, you can control the flow
of your batch-file. Remember that errorlevel 0 means that the test is
not triggered and 255 means that an error in the MTC call is found.
2.4 Runtime options
────────────────────────────────────────────────────────────────────────
There are two options that control MTC itself. These are the TASK: and
DESC: options. TASK: must be present and must be followed by the task-
number. Remember that every separate test must have a separate task-
number otherwise MTC will mix the tests. TASK:1 means that task 1 is
active (and semaphore-file MTC.001 is used). You can supply task-num-
bers between 1 and 255.
DESC: is optional and can contain the text you want to assign to the
task you supplied. If the text must contain spaces, you must replace
them with an underscore. DESC:Backup_the_C:_drive will display the
following text 'Backup the C: drive'. If DESC: is left out, MTC will
report 'Default task'.
2.5 Switches
────────────────────────────────────────────────────────────────────────
Switches also control the behavior of MTC. There are a number of them
and they are ALL optional. Also look into chapter xx.xx to read the
info about MTCCFG.EXE;
│/Q : When a test is triggered, MTC will give the errorlevel
│ that belongs to that trigger. In some cases (attended
│ machines), you would like to have the option to decide
│ yourself if the errorlevel should be returned or not.
│ In this case you can let MTC ask for the action to per-
│ form. If this option is active, the following will hap-
│ pen:
│ - MTC starts and tests if the decided test is triggered
│ or not;
│ - If not, errorlevel 0 is returned and you will see
│ nothing (e.g. the trigger is not set or the task
│ was already performed in this period);
│ - If the test is triggered, MTC will ask the user if
│ the trigger should be performed or not. The user
│ can do the following:
│
│ - Answer 'Y'
│ In this case MTC will return the errorlevel that
│ belongs to this trigger;
│ - Answer 'N'
│ In this case MTC will return errorlevel 0 (as if
│ there was no trigger). Depending on the test, MTC
│ will ask the same question next time until 'Y' or
│ 'Q' is supplied;
│ - Answer 'Q'
│ Only with triggers that use a semaphore (so trig-
│ gers on dates and changed files), you can instruct
│ MTC to return errorlevel 0 (as if there was no
│ trigger and the same as replying 'N') AND to update
│ the semaphore, so within this period the test will
│ not be performed anymore. F.i. you have a daily
│ test to perform an incremental backup. Now if you
│ reply 'Y', MTC will start that process and will
│ only trigger again when the next day arrives. If
│ you reply 'N', the task is not performed but if you
│ reboot your machine (the same day, with MTC in the
│ autoexec.bat file), MTC will start asking again.
│ If you reply 'Q', MTC will not start the task and
│ the semaphore is updates so you will not be bothered
│ with the question anymore this day.
│
│ /Q is a toggle. If you installed MTC (with MTCCFG) with
│ the default to ask questions, /Q will overrule that and
│ no questions are asked. If you did NOT install MTC with
│ a default to ask questions, /Q will overrule that and
│ will start asking questions;
│
│/B : /B is a toggle like /Q. If MTC is not to beep by default,
│ /B will start MTC to use the beep and reversed;
/Dmmddyy : When you supply this parameter, you overrule the time and
date in the PC itself. This comes in handy when you want
to execute a test for a specific date without resetting
the date/time of your PC. Normally MTC will use the cur-
rent system's date and time;
/R : /R must be supplied without one of the options that are
described in the next chapters. /R will delete the sema-
phore file of the supplied task, thus resetting the task
to scratch. You can also delete the MTC.nnn file with a
normal DOS DEL(ETE) command to gain the same results;
2.6 Options that do something with the date
────────────────────────────────────────────────────────────────────────
There are a lot of different options available that do something with
the date.
There are 3 groups. The 'normal' tests, the 'relative' tests and the
'absolute' tests. Some of them are superfluous (you can use another
construction to gain the same result) but they are setup in a way
that they are consistent.
2.6.1 Normal dates
────────────────────────────────────────────────────────────────────────
D/DN : The test is triggered each day (at 00:00:00 or the first moment
after this time that the test is done). If the test is valid
(e.g. triggered), MTC will return with an errorlevel equal to
the day-number (1=Sunday, 2=Monday .... 7=Saturday) and can be
used to do different things on different days.
When the DN option is used, MTC will return a fixed errorlevel
of 250 and not the day-number;
H/HN : The test is triggered each week (on monday 00:00:00 or the
first moment after this time the test is done. If the test is
valid (e.g. triggered), MTC will with an errorlevel equal to
the week-number. Notice that some people call the week with
the 1th of january week 1 (even if Jan. 1th is not a monday)
and some people call it week 53. MTC uses the latter.
When the HN option is used, MTC will return a fixed errorlevel
of 250 and not the week-number;
MN : The test is triggered each month (on 1th at 00:00:00 or the
first moment after this time the test is done). If the test is
valid (e.g. triggered), MTC will with an errorlevel equal to
the month-number (1 to 12).
When the MN option is used, MTC will return a fixed errorlevel
of 250 and not the month-number;
QN : The test is triggered each quarter (on 1th at 00:00:00 or the
first moment after this time the test is done). If the test is
valid (e.g. triggered), MTC will with an errorlevel equal to
the quarter-number (1,2,3 or 4);
When the QN option is used, MTC will return a fixed errorlevel
of 250 and not the quarter-number;
YN : The test is triggered each year (on 1/1 at 00:00:00 or the
first moment after this time the test is done). If the test is
valid (e.g. triggered), MTC will with an errorlevel equal to
the year-number minus 1900 (80 to 99);
When the YN option is used, MTC will return a fixed errorlevel
of 250 and not the year-number minus 1900;
2.6.2 Relative dates
────────────────────────────────────────────────────────────────────────
DRx : The test is triggered on every day with day-number 'x', where
'x' is 1 (sunday) to 7 (saturday). The test is valid for a
trigger at 00:00:00 on that day. When triggered, errorlevel
250 is returned;
HRx : The test is triggered on every week with day-number 'x', where
'x' is 1 to 53. The test is valid for a trigger on monday at
00:00:00 in that week (or later). When triggered, errorlevel
250 is returned;
MRx : The test is triggered on every month with month-number 'x',
where 'x' is 1 to 12. The test is valid for a trigger on 1th at
00:00:00 in that month (or later). When triggered, errorlevel
250 is returned;
QRx : The test is triggered on every quarter with number 'x', where
'x' is 1 to 4. The test is valid for a trigger on 1th of that
quarter at 00:00:00 (or later). When triggered, errorlevel 250
is returned;
YRx : The test is triggered on year with number 'x', where 'x' is
80 to 99. The test is valid for a trigger on 1/1 of that year
at 00:00:00 (or later). When triggered, errorlevel 250 is
returned;
2.6.3 Absolute dates
────────────────────────────────────────────────────────────────────────
HSmmddyy : The test is triggered every week where mmddyy is the base
for the test. For example, HS071391 will trigger on
20th of July, the 27th of July and so on. There must be
always a multiple of 7 days counted from mmddyy to trig-
ger the test. When triggered, errorlevel 250 is returned;
MSmmddyy : The test is triggered every month where mmddyy is the base
for the test. For example, MS071391 will trigger on
13th of Aug., the 13th of Sep. and so on.
When triggered, errorlevel 250 is returned;
QSmmddyy : The test is triggered every quarter where mmddyy is the
base for the test. For example, MS071391 will trigger on
13th of Oct., the 13th of Jan. and so on.
When triggered, errorlevel 250 is returned;
YSmmddyy : The test is triggered every year where mmddyy is the
base for the test. For example, MS071391 will trigger on
13th July 1992, the 13th July 1993 and so on.
When triggered, errorlevel 250 is returned;
OSmmddyy : The test is triggered only once on mmddyy.
When triggered, errorlevel 250 is returned;
2.7 Options that do something with the RS232
────────────────────────────────────────────────────────────────────────
CLx : The test is ALWAYS (not only once a day) triggered when
the carrier signal on COMx is LOW. There will be no
MTC.nnn file created ! When the carrier is low, MTC will
return errorlevel 250;
CHx : The test is ALWAYS (not only once a day) triggered when
the carrier signal on COMx is HIGH. There will be no
MTC.nnn file created ! When the carrier is high, MTC will
return errorlevel 250;
2.8 Options that do something with DesqView
────────────────────────────────────────────────────────────────────────
DVL : The test is ALWAYS (not only once a day) triggered when
DesqView is NOT present (active). When DesqView is not
active, MTC will return errorlevel 250;
DVH : The test is ALWAYS (not only once a day) triggered when
DesqView IS present (active). When DesqView IS active,
MTC will return errorlevel 250;
2.9 Options that do something with files
────────────────────────────────────────────────────────────────────────
@Effffff : The test is ALWAYS (not only once a day) triggered when
the file ffffff is present. You can use wildcards but re-
member that only the first found hit is tested.
If you want to test if DIR.EXE is in F:\TRAP, you CAN
supply F:\TRAP\*.EXE, but if DIR.EXE is not present but
COPY.EXE is, MTC will trigger. F:\TRAP\*.* can be used
to see if any file is present in F:\TRAP because MTC will
ignore directory and volumeID entries. Included are the
files with read-only, hidden and system attributes.
You can/must supply drives and directories. An example,
@EF:\TRASH\*.MSG will trigger when a *.MSG file is present
in F:\TRASH. When triggered, MTC will return with error-
level 250;
@Cffffff : The test is ALWAYS (not only once a day) triggered when
the file ffffff is CHANGED. You can use wildcards but re-
member that only the first found hit is tested.
If you want to test if DIR.EXE in F:\TRAP is changed, you
CAN supply F:\TRAP\*.EXE, but if COPY.EXE in the directory
comes before DIR.EXE, MTC will look if COPY.EXE is changed.
IF the previous time DIR.EXE WAS tested, you are bound to
get a trigger because COPY.EXE and DIR.EXE will not be the
same I presume. MTC will ignore directory and volumeID
entries in the directory but will include files with the
system, read-only and/or hidden attributes.
A change is detected when either the filesize and/or the
file-date of the file is/are changed. In this special case,
MTC will not create a zero-length MTC.nnn file but a file
of 8 bytes long.
When triggered, MTC will return with errorlevel 250. The
first time MTC tests the file, it is marked as not changed
so at the earliest, MTC will trigger with the second exe-
cute;
@Affffff : The test is ALWAYS (not only once a day) triggered when
the file ffffff is an archive. You can use wildcards but
remember that only the first found hit is tested.
If you want to test if DIR.ARC is an archive you CAN
supply *.ARC, but if DIR.ARC is not present but COPY.ARC
is, MTC will trigger. MTC will only test files with nor-
mal attributes.
Any file can be supplied. MTC uses the OPCFI routine that
is also used in programs like MTA, MTS, MTT, MTV, QFV and
so on. The OPCFI will return correct values, even when
the file has an non-archive extension (like COPY.SDN) or
when the file is a SFX-archive (PKZ110.EXE).
When triggered (e.g. the file is an archive), MTC will
return with a non-zero errorlevel. The following error-
levels can be expected:
1 : File is ARC/PAK/PKA compatible
2 : File is ZIP compatible
3 : File is ZOO compatible
4 : File is LZH/LZS compatible
5 : File is DWC compatible
6 : File is MD/MDCD compatible
7 : File is LBR/LU compatible
8 : File is ARJ compatible
9 : File is HYP compatible
2.10 Options that do something with (space on) disks
────────────────────────────────────────────────────────────────────────
SLdsssss : The test is ALWAYS (so not only once in a period) triggered
when the free-space on drive 'd' is below the value 'ssss'
(in bytes).
If /Q is present, you will also see a bar-chart of the used
space on the drive. When the bar is green, the free-space
is 50% or more of the total space on the drive. When the
bar-chart is yellow, between 50% and 25% of the drive is
free and when the bar-chart is red, between 25% and 0% of
the drive is free (colors only with the correct graphics
adapter and a color-monitor I'm afraid).
When triggered, MTC will return with errorlevel 250;
SEdsssss : The test is ALWAYS (so not only once in a period) triggered
when the free-space on drive 'd' is equal to 'ssss' (in
bytes).
If /Q is present, you will also see a bar-chart of the used
space on the drive.
When triggered, MTC will return with errorlevel 250;
SGdsssss : The test is ALWAYS (so not only once in a period) triggered
when the free-space on drive 'd' is greater than the value
'ssss' (in bytes).
If /Q is present, you will also see a bar-chart of the used
space on the drive.
When triggered, MTC will return with errorlevel 250;
DPd : The test is ALWAYS (so not only once in a period) triggered
when drive d is present AND contains a disk(ette). In that
case errorlevel 250 is returned, otherwise errorlevel 0.
MTC will trap all errors, so the common message from DOS
(Abort, Retry, Ignore) will never be given;
2.11 Options that do something with the PC environment
────────────────────────────────────────────────────────────────────────
MLbbbbb : The test is ALWAYS (so not only once in a period) triggered
when the free conventional memory is LESS than the value
'bbbbb' (in bytes). The space that MTC occupies itself is
NOT counted, so the value is tested against the memory
without MTC in memory.
When triggered, MTC will return with errorlevel 250;
MEbbbbb : The test is ALWAYS (so not only once in a period) triggered
when the free conventional memory is EQUAL than the value
'bbbbb' (in bytes). The space that MTC occupies itself is
NOT counted, so the value is tested against the memory
without MTC in memory.
When triggered, MTC will return with errorlevel 250;
MGbbbbb : The test is ALWAYS (so not only once in a period) triggered
when the free conventional memory is GREATER than the value
'bbbbb' (in bytes). The space that MTC occupies itself is
NOT counted, so the value is tested against the memory
without MTC in memory.
When triggered, MTC will return with errorlevel 250;
EMA : The test is ALWAYS (so not only once in a period) triggered
when Expanded Memory (EMS) is available in the PC.
When triggered, MTC will return with errorlevel 250;
EXA : The test is ALWAYS (so not only once in a period) triggered
when Extended Memory is available in the PC.
When triggered, MTC will return with errorlevel 250;
XMA : The test is ALWAYS (so not only once in a period) triggered
when XMS (or any XMS driver) is available in the PC.
When triggered, MTC will return with errorlevel 250;
GDA : The test is ALWAYS (so not only once in a period) triggered
and returns an errorlevel depending on the graphical card
you have in your machine. The following errorlevels are
returned:
1: Hercules card present;
2: CGA card present;
3: MCGA card present;
4: EGA card present;
5: VGA card present;
6: PDA card present;
┌───────┬─────────────────────────────────────────────────────────────┐
│ 3 │ Examples │
└───────┴─────────────────────────────────────────────────────────────┘
3.1 A simple example for backup
────────────────────────────────────────────────────────────────────────
An example with MTC for backing up my disks. I want to have a full
backup on Sunday and an appended (incremental) backup on all other
days:
@ECHO OFF
:BACKUPC
MTC TASK:1 DESC:Backup_Drive_C: D /B /Q
IF ERRORLEVEL 7 GOTO INCRBCKC
IF ERRORLEVEL 6 GOTO INCRBCKC
IF ERRORLEVEL 5 GOTO INCRBCKC
IF ERRORLEVEL 4 GOTO INCRBCKC
IF ERRORLEVEL 3 GOTO INCRBCKC
IF ERRORLEVEL 2 GOTO INCRBCKC
IF ERRORLEVEL 1 GOTO FULLBCKC
GOTO BACKUPD
:INCRBCKC
CPBACKUP C: /INC
GOTO BACKUPD
:FULLBCKC
CPBACKUP C: /FULL
GOTO BACKUPD
:BACKUPD
MTC TASK:2 DESC:Backup_Drive_D: D /B /Q
IF ERRORLEVEL 7 GOTO INCRBCKD
IF ERRORLEVEL 6 GOTO INCRBCKD
IF ERRORLEVEL 5 GOTO INCRBCKD
IF ERRORLEVEL 4 GOTO INCRBCKD
IF ERRORLEVEL 3 GOTO INCRBCKD
IF ERRORLEVEL 2 GOTO INCRBCKD
IF ERRORLEVEL 1 GOTO FULLBCKD
GOTO BACKUPE
:INCRBCKD
CPBACKUP D: /INC
GOTO BACKUPE
:FULLBCKD
CPBACKUP D: /FULL
GOTO BACKUPE
:BACKUPE
MTC TASK:3 DESC:Backup_Drive_E: D /B /Q
IF ERRORLEVEL 7 GOTO INCRBCKE
IF ERRORLEVEL 6 GOTO INCRBCKE
IF ERRORLEVEL 5 GOTO INCRBCKE
IF ERRORLEVEL 4 GOTO INCRBCKE
IF ERRORLEVEL 3 GOTO INCRBCKE
IF ERRORLEVEL 2 GOTO INCRBCKE
IF ERRORLEVEL 1 GOTO FULLBCKE
GOTO BACKUPF
:INCRBCKE
CPBACKUP E: /INC
GOTO BACKUPF
:FULLBCKE
CPBACKUP E: /FULL
GOTO BACKUPF
:BACKUPF
MTC TASK:4 DESC:Backup_Drive_F: D /B /Q
IF ERRORLEVEL 7 GOTO INCRBCKF
IF ERRORLEVEL 6 GOTO INCRBCKF
IF ERRORLEVEL 5 GOTO INCRBCKF
IF ERRORLEVEL 4 GOTO INCRBCKF
IF ERRORLEVEL 3 GOTO INCRBCKF
IF ERRORLEVEL 2 GOTO INCRBCKF
IF ERRORLEVEL 1 GOTO FULLBCKF
GOTO END
:INCRBCKF
CPBACKUP F: /INC
GOTO END
:FULLBCKF
CPBACKUP F: /FULL
GOTO END
REM ********************************************************************
REM * T E R M I N A T I O N *
REM ********************************************************************
:END
With the above example, I have full control over the backups on any of
my drives C: to F: because for every drive I have created a specific
task (TASK:xx). You could also replace the 'D' option with a series
of MTC calls for each day of the week, like
MTC TASK:1 DESC:bla_bla DR1 (gives 250 on Sunday , otherwise 0);
MTC TASK:2 DESC:bla_bla DR2 (gives 250 on Monday , otherwise 0);
MTC TASK:3 DESC:bla_bla DR3 (gives 250 on Tuesday , otherwise 0);
MTC TASK:4 DESC:bla_bla DR4 (gives 250 on Wednesday, otherwise 0);
MTC TASK:5 DESC:bla_bla DR5 (gives 250 on Thursday , otherwise 0);
MTC TASK:6 DESC:bla_bla DR6 (gives 250 on Friday , otherwise 0);
MTC TASK:7 DESC:bla_bla DR7 (gives 250 on Saturday , otherwise 0);
3.2 An example of tossing messages when received
────────────────────────────────────────────────────────────────────────
In the next example, MTC is used to do the following:
- Check if messages are received;
- If so, toss them into the message base;
- If messages are to be tossed, check to see if enough disk-space
is available, otherwise run a cleanup task before tossing;
- Do everything very quiet, the whole place could be in bed;
@ECHO OFF
MTC TASK:1 @ED:\MAILER\INBOUND\*.PKT
IF ERRORLEVEL 250 GOTO SPACE
GOTO END
:SPACE
MTC TASK:2 SLD500000
IF ERRORLEVEL 250 GOTO CLEAN
GOTO TOSS
:CLEAN
CLEANUP D:\MAILER\MSGBASE /ToOld
:TOSS
TOSSMSGS D:\MAILER\INBOUND D:\MAILER\MSGBASE
:END
EXIT
3.3 An example of a cold/warm start of a terminal program
────────────────────────────────────────────────────────────────────────
In the next example a terminal program DISPIX is started. When the
carrier is already present, DISPIX is started without an init of the
modem, otherwise a 'cold' start is performed. Because the program uses
ANSI codes and it is possible that it is executed under DesqView, a
second test is implemented. Everything goes fast and quiet:
@ECHO OFF
MTC TASK:5 DVL
IF ERRORLEVEL 250 GOTO DISPIX
DVANSI
:DISPIX
MTC TASK:6 CH1 DESC:Test_carrier_on_COM1
IF ERRORLEVEL 250 GOTO DISPIXW
:DISPIXC
DISPIX /COLD
GOTO END
:DISPIXW
DISPIX /WARM
:END
EXIT
3.4 An example of a full optimize of a 120Mb HDU
────────────────────────────────────────────────────────────────────────
In the next example, we want to optimize the 120Mb HDU on a daily
frequency, but only unfragment files. Only once every month, we
want to do a FULL optimize and a short check on the drive.
All, except the daily, tasks require the OK from the user. As a special
bonus, every 3th and 9th month of the year is the time to do a full
test on the hard disk.
@ECHO OFF
MTC TASK:1 /Q DESC:Full_Check MR3
IF ERRORLEVEL 250 GOTO FULLCHECK
MTC TASK:1 /Q DESC:Full_Check MR9
IF ERRORLEVEL 250 GOTO FULLCHECK
GOTO OPTCHECK
:FULLCHECK
DRIVETEST /FULL /MAX /VERYLONG C:
OPTIMIZE /FULL
GOTO END
:OPTCHECK
MTC TASK:1 /Q DESC:Full_Optimize_&_Check MN (USE task 1, see notes)
IF ERRORLEVEL 250 GOTO DOOPTCHK
GOTO OPTIMIZE
:DOOPTCHK
DRIVETEST /SHORT /MIN /VERYSHORT
OPTIMIZE /FULL
GOTO END
:OPTIMIZE
MTC TASK:1 /Q DESC:Defragment DN
IF ERRORLEVEL 250 GOTO DEFRAGM
GOTO END
:DEFRAGM
OPTIMIZE /DEFRAG
:END
EXIT
As you can see we use TASK 1 for different tests in this case. We can
do so because the tests will never interfere with each other. If MR3
or MR9 is executed, the batch will lead to :END after the optimize
and check. This goes all the way. If we should use different tasks
the following would happen (given the first execute in month 3).
The MR3 would be executed and the rest would be skipped BUT if you
should reboot the machine (re-execute the batch), MR3 would give
errorlevel 0 and M would become active. If this was another task
(let say TASK:2), it would return with errorlevel 3. Now there is
a GOTO END, but what is we reboot/re-execute again ? Now MR3 and M
are skipped but D (being TASK:3 for example) would become active
and return a 2 (monday). Another unfragment would start !
Using TASK:1 for all the tests will ensure us that all tests will
NOT trigger when one is triggered before the same day !!!
┌───────┬─────────────────────────────────────────────────────────────┐
│ 4 │ Version information and credits │
└───────┴─────────────────────────────────────────────────────────────┘
4.1 The BETA-team
────────────────────────────────────────────────────────────────────────
In the header of the documentation you have found a list of support
BBS's and beta-testers (the Sysop's of the marked BBS's).
These beta-testers are allowed to use beta-copies of this program. Also
when you, as a normal user, have questions or remarks, you could always
try to contact one of the beta-members before contacting me. In that
case the beta-tester will pass any problems to me directly.
The beta-policy is different for each of the DISP-programs. Some of
the versions will not get a beta-test at all, some of them will be
tested at great length.
Distribution policy is tight. The newest versions will always be
available at 2:512/100 first. From here they are distributed to the
distribution-nodes. It depends on the number of polls that such a
board does, how fast it will be available on the distribution-node.
In general this will take anywhere from 1 hour to 3 days.
4.2 Credits
────────────────────────────────────────────────────────────────────────
Thanks to the following people:
- All you who keep asking for little utilities.
4.3 Version history
────────────────────────────────────────────────────────────────────────
┌───────┬────────────────────────────┐
│ 1.01 │ Release │
└───────┴────────────────────────────┘
■ First public release;
┌───────┬────────────────────────────┐
│ 2.01 │ Release │
└───────┴────────────────────────────┘
■ 1.01 was a bit of an 'easy-done' version and contained only op-
tions that I myself use frequently on my PC. This version is
extended with lots of new tests. It will go to far to add them
all to the history in detail, so I will only give a list of new
options (without their functions);
■ Renamed program from CDT to MTC;
■ Added normal date-tests D (DN), H (HN), M (MN), Q (QN) and Y (YN);
■ Added relative date tests DRx, HRx, MRx, QRx and YRx;
■ Added absolute date tests DSmmddyy, HSmmddyy, MRmmddyy, QSmmddyy
and YSmmddyy;
■ Added tests on carrier CHx, CLx;
■ Added tests on desqview DVH, DVL;
■ Added tests on disk SLdssss, SEdssss, SGdssss and DPd;
■ Added tests on files @Effff, @Cffff and @Affff;
■ Added tests on the PC environment (memory, display adapter);
┌───────┬────────────────────────────┐
│ 2.05 │ Minor release │
└───────┴────────────────────────────┘
■ 2.01 was a bit slow. This was caused by the routines for registered
users. These routines are now changed and MTC.EXE does not need any
separate files anymore. On slow machines this can speedup things up
to 100%;
■ The screen for non-registered users is changed. MTC now ONLY waits
for 15 seconds. The remaining 60 seconds that could be overruled
with a 4 digit key are removed. Also the registration-screen does
not use any beep anymore;
■ Added an installation program to install some special defaults;
■ MTC.EXE can now be compressed AFTER you installed MTC.EXE with
MTCCFG.EXE;
■ Added 'Q' in the input-screen to return errorlevel 0 (no trigger)
and to update the semaphore-file (MTC.nnn) so the question will
not return this period;
■ Fixed some bugs in the documentation;
4.4 Copyright, Trademarks
────────────────────────────────────────────────────────────────────────
MTC is written in Turbo Pascal 6.0, with help of the Turbo Debugger 2.0
and makes extensive use of Object Professional 1.11.
Also included are some routines of Blaise's fine PowerTools Plus
package (5.1) and Blaise's Asynch Plus (5.0). Both STRG (6.1a) and
SYS (6.0a) are included (commercial license).
Turbo Pascal is a trademark of Borland International
Turbo Debugger is a trademark of Borland International
Object Professional is a trademark of TurboPower Inc.
PowerTools Plus is a trademark of Blaise Computing Inc.
OPCFI is a trademark of Robert W. van Hoeven
STRG and SYS are trademarks of Eagle Performance Software
DesqView is a trademark of Quarterdeck
==================== END OF DOCUMENT ==================================